﻿<phone:PhoneApplicationPage 
    x:Class="Win7RovMobileApp.MainPage"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:phone="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone"
    xmlns:shell="clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    xmlns:gauge="clr-namespace:CircularGauge;assembly=CircularGauge"
    xmlns:controls="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls"
    xmlns:toolkit="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls.Toolkit" 
    mc:Ignorable="d" d:DesignWidth="480" d:DesignHeight="768"
    FontFamily="{StaticResource PhoneFontFamilyNormal}"
    FontSize="{StaticResource PhoneFontSizeNormal}"
    Foreground="{StaticResource PhoneForegroundBrush}"
    SupportedOrientations="Portrait" Orientation="Portrait"
    shell:SystemTray.IsVisible="True">

    <controls:Pivot>
        <controls:Pivot.Background>
            <ImageBrush ImageSource="/Win7RovMobileApp;component/Images/RoadBackground.png" Stretch="Fill" Opacity="0.7" />
        </controls:Pivot.Background>

        <!--Pivot item one-->
        <controls:PivotItem Header="Start" Name="StartPivotItem">
            <Grid x:Name="LayoutRoot" Opacity="1">
                <Grid.RowDefinitions>
                    <RowDefinition Height="Auto"/>
                    <RowDefinition Height="*"/>
                </Grid.RowDefinitions>
                <gauge:CircularGaugeControl x:Name="appGauge" Grid.Row="0" 
                                    HorizontalAlignment="Center" 
                                    VerticalAlignment="Top"
                                    
                                    Radius="220" 
                                    ScaleRadius="160" 
                                    ScaleStartAngle="120" 
                                    ScaleSweepAngle="300"
                                    PointerLength="145" 
                                    PointerCapRadius="35" 
                                    MinValue="0" 
                                    MaxValue="240" 
                                    MajorDivisionsCount="12" 
                                    MinorDivisionsCount="4" 
                                    CurrentValue="{Binding Score}"
                                        
                                    ImageSize="60,50"
                                    RangeIndicatorThickness="8"
                                    RangeIndicatorRadius="140"
                                    RangeIndicatorLightRadius="12"
                                    RangeIndicatorLightOffset="100"
                                    ScaleLabelRadius="190"
                                    ScaleLabelSize="40,20"
                                    ScaleLabelFontSize="15"
                                    ScaleLabelForeground="AliceBlue"
                                    MajorTickSize="10,3"
                                    MinorTickSize="3,1"
                                    MajorTickColor="LightGray"
                                    MinorTickColor="LightGray"
                                    ImageOffset="-70"
                                    GaugeBackgroundColor="#542F004C"
                                    PointerThickness ="16"
                                    OptimalRangeStartValue="90"
                                    OptimalRangeEndValue="130" 
                                    DialTextOffset="-60" 
                                    DialText="km/h"
                                    DialTextColor="Black"
                                    >
                </gauge:CircularGaugeControl>
                <Grid x:Name="ContentPanel" Grid.Row="1" Margin="20,10">
                    <Grid.RowDefinitions>
                        <RowDefinition Height="20*" />
                        <RowDefinition Height="20*" />
                    </Grid.RowDefinitions>
                    <Button Content="Cumpara rovinieta" Name="BuyNewRovButton" Grid.Row="0" Click="BuyNewRovButton_Click">
                        <Button.Background>
                            <LinearGradientBrush EndPoint="1,0.5" StartPoint="0,0.5">
                                <GradientStop Color="Black" Offset="0" />
                                <GradientStop Color="#355E1B96" Offset="1" />
                            </LinearGradientBrush>
                        </Button.Background>
                    </Button>
                    <Button Content="Verifica rovinieta achizitionata" Name="ShowOldRovButton" Grid.Row="1" Click="ShowOldRovButton_Click">
                        <Button.Background>
                            <LinearGradientBrush EndPoint="1,0.5" StartPoint="0,0.5">
                                <GradientStop Color="Black" Offset="0" />
                                <GradientStop Color="#602C7632" Offset="1" />
                            </LinearGradientBrush>
                        </Button.Background>
                    </Button>
                </Grid>
            </Grid>
        </controls:PivotItem>

        <!--Pivot item two-->
        <controls:PivotItem Header="Info" Name="InfoPivotItem">
            <ScrollViewer>
                <Grid>
                    <Grid.RowDefinitions>
                        <RowDefinition Height="Auto"/>
                        <RowDefinition Height="Auto"/>
                        <RowDefinition Height="Auto"/>
                        <RowDefinition Height="Auto"/>
                    </Grid.RowDefinitions>
                    <TextBlock Grid.Row="0" VerticalAlignment="Top" HorizontalAlignment="Left" Text="Domeniu de aplicare al rovignetei" FontWeight="Bold" FontSize="20" Margin="0,20">
                        <TextBlock.Foreground>
                            <LinearGradientBrush EndPoint="1,0.5" StartPoint="0,0.5">
                                <GradientStop Color="#FFD40505" Offset="0" />
                                <GradientStop Color="#FFE2CF40" Offset="0.506" />
                                <GradientStop Color="#FF225BDB" Offset="0.977" />
                            </LinearGradientBrush>
                        </TextBlock.Foreground>
                    </TextBlock>
                    <TextBlock Grid.Row="1" TextWrapping="Wrap" Name="AplicareRovigTextBlock"/>
                    <TextBlock Grid.Row="2" VerticalAlignment="Top" HorizontalAlignment="Left" Text="Categorii rovinieta in functie de autovehicul" FontWeight="Bold" FontSize="20" Margin="0,40,0,20">
                        <TextBlock.Foreground>
                            <LinearGradientBrush EndPoint="1,0.5" StartPoint="0,0.5">
                                <GradientStop Color="#FFD40505" Offset="0" />
                                <GradientStop Color="#FFE2CF40" Offset="0.506" />
                                <GradientStop Color="#FF225BDB" Offset="0.977" />
                            </LinearGradientBrush>
                        </TextBlock.Foreground>
                    </TextBlock>
                    <TextBlock Grid.Row="3" TextWrapping="Wrap" Name="CategoriiRovigTextBlock"/>
                </Grid>
            </ScrollViewer>
        </controls:PivotItem>

        <!--Pivot item three-->
        <controls:PivotItem Header="Reguli" Name="ReguliPivotItem">
            <ScrollViewer>
                <Grid>
                    <Grid.RowDefinitions>
                        <RowDefinition Height="Auto"/>
                        <RowDefinition Height="Auto"/>
                        <RowDefinition Height="Auto"/>
                        <RowDefinition Height="Auto"/>
                        <RowDefinition Height="Auto"/>
                        <RowDefinition Height="Auto"/>
                    </Grid.RowDefinitions>
                    <TextBlock Grid.Row="0" VerticalAlignment="Top" HorizontalAlignment="Left" Text="Termeni si conditii" FontWeight="Bold" FontSize="20" Margin="0,20">
                        <TextBlock.Foreground>
                            <LinearGradientBrush EndPoint="1,0.5" StartPoint="0,0.5">
                                <GradientStop Color="#FFD40505" Offset="0" />
                                <GradientStop Color="#FFE2CF40" Offset="0.506" />
                                <GradientStop Color="#FF225BDB" Offset="0.977" />
                            </LinearGradientBrush>
                        </TextBlock.Foreground>
                    </TextBlock>
                    <TextBlock Grid.Row="1" Name="TermeniTextBlock" TextWrapping="Wrap"/>
                    <TextBlock Grid.Row="2" VerticalAlignment="Top" HorizontalAlignment="Left" Text="Conditii de utilizare" FontWeight="Bold" FontSize="20" Margin="0,20">
                        <TextBlock.Foreground>
                            <LinearGradientBrush EndPoint="1,0.5" StartPoint="0,0.5">
                                <GradientStop Color="#FFD40505" Offset="0" />
                                <GradientStop Color="#FFE2CF40" Offset="0.506" />
                                <GradientStop Color="#FF225BDB" Offset="0.977" />
                            </LinearGradientBrush>
                        </TextBlock.Foreground>
                    </TextBlock>
                    <TextBlock Grid.Row="3" Name="ConditiiTextBlock" TextWrapping="Wrap"/>
                    <TextBlock Grid.Row="4" VerticalAlignment="Top" HorizontalAlignment="Left" Text="Securitatea datelor personale" FontWeight="Bold" FontSize="20" Margin="0,20">
                        <TextBlock.Foreground>
                            <LinearGradientBrush EndPoint="1,0.5" StartPoint="0,0.5">
                                <GradientStop Color="#FFD40505" Offset="0" />
                                <GradientStop Color="#FFE2CF40" Offset="0.506" />
                                <GradientStop Color="#FF225BDB" Offset="0.977" />
                            </LinearGradientBrush>
                        </TextBlock.Foreground>
                    </TextBlock>
                    <TextBlock Grid.Row="5" Name="SecuritateTextBlock" TextWrapping="Wrap"/>
                </Grid>
            </ScrollViewer>
        </controls:PivotItem>

        <!--Pivot item four-->
        <controls:PivotItem Header="Contact" Name="ContactPivotItem">
            <Grid>
                <Grid.RowDefinitions>
                    <RowDefinition Height="Auto"/>
                    <RowDefinition Height="Auto"/>
                    <RowDefinition Height="Auto"/>
                    <RowDefinition Height="Auto"/>
                    <RowDefinition Height="Auto"/>
                    <RowDefinition Height="Auto"/>
                    <RowDefinition Height="Auto"/>
                </Grid.RowDefinitions>
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="Auto"/>
                    <ColumnDefinition Width="*"/>                    
                </Grid.ColumnDefinitions>
                <TextBlock Grid.Row="0" Text="Trimite mail" FontSize="26" FontWeight="Bold" Margin="0,20">
                    <TextBlock.Foreground>
                        <LinearGradientBrush EndPoint="1,0.5" StartPoint="0,0.5">
                            <GradientStop Color="#FFD40505" Offset="0" />
                            <GradientStop Color="#FFE2CF40" Offset="0.506" />
                            <GradientStop Color="#FF225BDB" Offset="0.977" />
                        </LinearGradientBrush>
                    </TextBlock.Foreground>
                </TextBlock>
                <TextBlock Grid.Row="1" Grid.Column="0" Text="Nume" VerticalAlignment="Center"/>
                <TextBlock Grid.Row="2" Grid.Column="0" Text="Prenume" VerticalAlignment="Center"/>
                <TextBlock Grid.Row="3" Grid.Column="0" Text="Telefon" VerticalAlignment="Center"/>
                <TextBlock Grid.Row="4" Grid.Column="0" Text="Email" VerticalAlignment="Center"/>
                <TextBlock Grid.Row="5" Grid.Column="0" Text="Mesaj" VerticalAlignment="Center"/>
                <TextBox Grid.Row="1" Grid.Column="1" Name="NumeTextBox"/>
                <TextBox Grid.Row="2" Grid.Column="1" Name="PrenumeTextBox"/>
                <TextBox Grid.Row="3" Grid.Column="1" Name="TelefonTextBox"/>
                <TextBox Grid.Row="4" Grid.Column="1" Name="EmailTextBox"/>
                <TextBox Grid.Row="5" Grid.Column="1" Name="MesajTextBox" TextWrapping="Wrap" VerticalScrollBarVisibility="Auto" Height="200"/>
                <Button Grid.Row="6" Grid.Column="1" Content="Trimite" Click="SendMessageButton_Click"/>                
            </Grid>
        </controls:PivotItem>
    </controls:Pivot>

</phone:PhoneApplicationPage>